home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ARASAN_S.ZIP / MOVEORD.H < prev    next >
C/C++ Source or Header  |  1994-04-27  |  1KB  |  39 lines

  1. // Copyright 1992 by Jon Dart.  All Rights Reserved.
  2.  
  3. #ifndef _MOVE_ORDERING_H
  4. #define _MOVE_ORDERING_H
  5.  
  6. #include "emove.h"
  7. #include "board.h"
  8.  
  9. class Move_Ordering
  10. {
  11.     // sorts moves according to plausibility, maintains killer list.
  12.  
  13.     public:    
  14.     
  15.     static void sort_moves( Move moves[], int scores[], int n);
  16.     // sort "n" moves in order of scores.
  17.         
  18.     static void order_moves( Board &board, Move moves[], const int num_moves,
  19.                  const int ply, const Move &best_move );        
  20.     // order moves returned by the move generator in order of
  21.     // guesstimated "goodness".        
  22.  
  23.     static int score( Board &board, const Move &move);
  24.     // return a score for an individual move.  The higher the score,
  25.     // the earlier in the search order it should be tried.
  26.         
  27.     static void set_killer( ExtendedMove &move, const unsigned ply );
  28.     // store "move" as a killer move for "ply"
  29.     
  30.     static void get_killer( Move &move, const unsigned ply );
  31.     // return the killer move for "ply"
  32.     
  33.     static void clear_killer();
  34.     // clear out the killer move array.
  35.         
  36. };
  37.  
  38. #endif
  39.